<template>
  <div>{{ a }}</div>
  <n-button type="primary" @click="test">Primary</n-button>
  <n-button type="primary" @click="test1">放回</n-button>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { useUserStore } from '@/stores'
import { _API_GetList } from '@/api'

const a = ref(1)

const test = () => {
  useUserStore().token = '123'
  a.value++
  _API_GetList().then((res) => {
    console.log(res)
  })
}

const test1 = () => {
  history.back()
}
</script>
